﻿<%@ Page Language="C#" MasterPageFile="~/TuDiem.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs"
    Inherits="Continental.UI.TuDiem.List" Title="Untitled Page" %>

<%@ Register Src="~/UI/TuDiem/Control/TopMenu.ascx" TagName="TopMenu" TagPrefix="Continental" %>
<%@ Register Src="~/UI/TuDiem/Control/Paging.ascx" TagName="Paging" TagPrefix="Continental" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <Continental:TopMenu ID="TopMenu1" runat="server" />
    <div id="list-content">
        <div style="width: 680px; float: left;">
            <asp:Repeater ID="rpTuDiemList" runat="server">
                <ItemTemplate>
                    <div class="list_item">
                        <div class="list_item_image">
                            <a href="/tu-diem-chi-tiet/<%#ConvertToUnSignForUrl(DataBinder.Eval(Container.DataItem, "TitleOrNameOfNhom").ToString()) %>/<%#ConvertToUnSignForUrl(DataBinder.Eval(Container.DataItem, "Name").ToString()) %>/<%#Eval("TuDiemID") %>.aspx">
                                <img src='/ImageData/TuDiem/<%#Eval("ImageUrl") %>' style="width: 130px; height: 130px;"
                                    alt='<%#Eval("TitleOrName") %>'>
                            </a>
                        </div>
                        <div class="list_item_content">
                            <h2>
                                <a href="/tu-diem-chi-tiet/<%#ConvertToUnSignForUrl(DataBinder.Eval(Container.DataItem, "TitleOrNameOfNhom").ToString()) %>/<%#ConvertToUnSignForUrl(DataBinder.Eval(Container.DataItem, "Name").ToString()) %>/<%#Eval("TuDiemID") %>.aspx"
                                    class="tip_trigger"><span>
                                        <%#Eval("TitleOrName") %></span>
                                    <div class="tip" style="top: 279px; left: 239px; display: none;">
                                        <table>
                                            <tbody>
                                                <tr>
                                                    <td rowspan="10" class="tooltipimg">
                                                        <img src="/ImageData/TuDiem/<%#Eval("ImageUrl") %>" class="tooltipimgfrm" alt='<%#Eval("TitleOrName") %>'>
                                                        <br>
                                                        <div>
                                                            <span>Số lượng xem :
                                                                <%#Eval("AmountOfClick") %></span>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tooltipcontainer">
                                                        <span>
                                                            <p>
                                                                <span style="color: #ff0000; font-family: times new roman,times; font-size: large;">
                                                                    <strong>
                                                                        <%#Eval("TitleOrName") %></strong></span><br>
                                                                <span style="font-family: times new roman,times; font-size: medium;">
                                                                    <%#Eval("Address") %></span><br>
                                                                <span style="font-family: times new roman,times; font-size: medium;">ĐT:
                                                                    <%#Eval("NumberPhone") %></span><br>
                                                                <span style="font-family: times new roman,times; font-size: medium;">Email:
                                                                    <%#Eval("Email") %></span><br>
                                                                <span style="font-family: times new roman,times; font-size: medium;">Website:
                                                                    <%#Eval("Website") %></span><br>
                                                            </p>
                                                        </span>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </a>
                            </h2>
                            <div class="discountcontainer">
                            </div>
                            <p>
                                <span>
                                    <%#Eval("ShortDescription") %></span>
                                <br>
                                <a href="/tu-diem-chi-tiet/<%#ConvertToUnSignForUrl(DataBinder.Eval(Container.DataItem, "TitleOrNameOfNhom").ToString()) %>/<%#ConvertToUnSignForUrl(DataBinder.Eval(Container.DataItem, "Name").ToString()) %>/<%#Eval("TuDiemID") %>.aspx"
                                    style="float: right"><span>[Chi tiết...]</span> </a>
                            </p>
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
            <Continental:Paging ID="Paging1" runat="server" PageSize="30" />
        </div>
        <div class="content_right">
            <div id="enews-3" class="widget enews-widget">
                <div class="widget-wrap">
                    <div class="enews">
                        <h4 class="widgettitle">
                            <span id="ctl00_Search_lblHeader">Tìm kiếm</span>
                        </h4>
                        <div style="margin-left: 10px;">
                            <div style="padding-top: 5px">
                                <span style="display: inline-block; width: 80px;">Từ khóa</span>
                                <input type="text" style="width: 180px;" class="subbox" value="Nhập từ khóa cần tìm...."
                                    onfocus="if (this.value == 'Nhập từ khóa cần tìm....') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Nhập từ khóa cần tìm....';}">
                            </div>
                            <div>
                                <div id="ctl00_Search_uplSearch">
                                    <div style="padding-top: 3px">
                                        <span style="display: inline-block; width: 80px;">Danh mục</span>
                                        <select class="txt_s" style="width: 180px;">
                                            <option value="-1">Tất cả</option>
                                            <option selected="selected" value="2">Nhà hàng</option>
                                            <option value="3">Khách sạn</option>
                                            <option value="4">Karaoke</option>
                                            <option value="5">Spa/Làm đẹp</option>
                                            <option value="6">Cafe/Trà sữa</option>
                                            <option value="8">Quán</option>
                                        </select>
                                    </div>
                                    <div style="padding-top: 3px">
                                        <span style="display: inline-block; width: 80px;">Quận/Huyện</span>
                                        <select class="txt_s" style="width: 180px;">
                                            <option selected="selected" value="-1">Tất cả</option>
                                        </select>
                                    </div>
                                    <div style="padding-top: 3px">
                                        <span style="display: inline-block; width: 80px;">Đường</span>
                                        <select class="txt_s" style="width: 180px;">
                                            <option value="-1">Tất cả</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div style="padding-top: 3px; padding-left: 83px">
                                <table>
                                    <tbody>
                                        <tr>
                                            <td>
                                                <input type="submit" value="Tìm kiếm" title="Tìm kiếm" class="search_btn green" style="font-family: Arial;
                                                    width: 100px;">
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="clear">
        </div>
    </div>

    <script type="text/javascript" language="javascript">
$(document).ready(function() {
	//Tooltips
	$(".tip_trigger").hover(function(){
		tip = $(this).find('.tip');
		tip.show(); //Show tooltip
	}, function() {
		tip.hide(); //Hide tooltip		  
	}).mousemove(function(e) {
		var mousex = e.pageX + 20; //Get X coodrinates
		var mousey = e.pageY + 20; //Get Y coordinates
		var tipWidth = tip.width(); //Find width of tooltip
		var tipHeight = tip.height(); //Find height of tooltip
		
		//Distance of element from the right edge of viewport
		var tipVisX = $(window).width() - (mousex + tipWidth);
		//Distance of element from the bottom of viewport
		var tipVisY = $(window).height() - (mousey + tipHeight);
		  
		if ( tipVisX < 20 ) { //If tooltip exceeds the X coordinate of viewport
			mousex = e.pageX - tipWidth - 20;
		} if ( tipVisY < 20 ) { //If tooltip exceeds the Y coordinate of viewport
			mousey = e.pageY - tipHeight - 20;
		} 
		tip.css({  top: mousey, left: mousex - 180 });
	});
});
    </script>

</asp:Content>
